/*******************************************************************************
 Copyright (c) 2010 Koninklijke Philips N.V.,
 All Rights Reserved.
 
 File name: swtimer.h
 Description: Header file for the SWTIMER component
 Project: XXX
 Component name: SWTIMER 
 $LastChangedDate:  $
 $Revision:  $
 $Author:  $
 Lighting GBU CFLi
 
 This source code and any compilation or derivative thereof is the
 proprietary information of Koninklijke Philips N.V.
 and is confidential in nature.
 Under no circumstances is this software to be combined with any Open Source
 Software in any way or placed under an Open Source License of any type without
 the express written permission of Koninklijke Philips N.V.
*******************************************************************************/

#ifndef __SW_TIMER_H__
#define __SW_TIMER_H__

#ifdef __cplusplus
extern "C" {
#endif
/*******************************************************************************
* INCLUDE FILES
*******************************************************************************/
#include "typedefs.h"

/*******************************************************************************
* CONSTANTS
*******************************************************************************/
#define SWTIMER_ID_INIT        (0xFF)


/*******************************************************************************
* MACROS
*******************************************************************************/

/*******************************************************************************
* TYPEDEFS
*******************************************************************************/

/*******************************************************************************
* VARIABLES
*******************************************************************************/

/*******************************************************************************
* FUNCTIONS
*******************************************************************************/
void swtimer_init(void);
uint8 swtimer_create(uint8 event, uint8 module_id);
void swtimer_destroy(uint8 swtimer_id);
void swtimer_drive_swtimer(void);
uint8 swtimer_is_runnig(uint8 swtimer_id);
void swtimer_start(uint8 swtimer_id, uint16 interval_ms, uint8 state);
void swtimer_start_once(uint8 swtimer_id, uint16 interval_ms);
void swtimer_start_period(uint8 swtimer_id, uint16 interval_ms);
void swtimer_stop(uint8 swtimer_id);

#ifdef __cplusplus
}
#endif

#endif //__SW_TIMER_H__
/******************************************************************************/